package day33.edu;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

// Created: 03/10/2025, ChangJiang Ru
public class BufferedReaderWriterTest {
    public static void main(String[] args) throws IOException
    {
        File file = new File("dpcp_utf-8.txt");

        FileReader fr = new FileReader(file);

        BufferedReader br = new BufferedReader(fr);

        char[] cBuffer = new char[1024];
        int len;
        while((len = br.read(cBuffer)) != -1)
        {
            String str = new String(cBuffer, 0, len);
            System.out.print(str);
        }

        br.close();
    }
}

